﻿@page "/input"
@using Pg2.ViewModels

<div class="row">
    <div class="col-auto col-lg-8">
        <Card IsShadow="true">
            <HeaderTemplate>
                <h2 class="text-danger justify-self-center">
                    摇号信息录入（个人)
                </h2>
            </HeaderTemplate>
            <BodyTemplate>
                <h5 class="text-center">借款抵押信息（客户经理应保证录入信息完整、真实和准确，不得重复摇号）</h5>
                <Divider />
                <ValidateForm Model="@Model2" OnValidSubmit="@OnValidSubmit2" OnInvalidSubmit="@OnInvalidSubmit2">
                    <div class="row g-3">
                        <div class="col-12 col-sm-6">
                            <BootstrapInput @bind-Value="@Model2.QYMC" Placeholder="借款人名称" />
                        </div>
                        <div class="col-12 col-sm-6">
                            <BootstrapInput @bind-Value="@Model2.DYLZYRMC" PlaceHolder="所有权人名称" />
                        </div>                        
                        <div class="col-12">
                            <Button ButtonType="@ButtonType.Submit" Icon="fa-fw fa-solid fa-floppy-disk" IsAsync="true" Text="提交表单" />
                        </div>
                    </div>
                </ValidateForm>
            </BodyTemplate>
            <FooterTemplate>
                2 days ago
            </FooterTemplate>
        </Card>
    </div>
</div>
@code {
    private InputViewModel Model2 = new InputViewModel();

    private Task OnValidSubmit2(EditContext context)
    {
        System.Console.WriteLine("Valid Submit");
        return Task.CompletedTask;
    }

    private Task OnInvalidSubmit2(EditContext context)
    {
        System.Console.WriteLine("Valid Submit");
        return Task.CompletedTask;
    }
}
